home *** CD-ROM | disk | FTP | other *** search
- //***********************************************************************
- //
- // VisualKB.h
- //
- //***********************************************************************
-
- #define MAX_STRINGS 12
-
- class CMyApp : public CWinApp
- {
- public:
- virtual BOOL InitInstance ();
- };
-
- class CMainWindow : public CWnd
- {
- private:
- int m_cxChar;
- int m_cyChar;
- int m_cyLine;
- int m_nTextPos;
- int m_nTabStops[7];
- int m_nTextLimit;
- int m_nMsgPos;
-
- HCURSOR m_hCursorArrow;
- HCURSOR m_hCursorIBeam;
-
- CPoint m_ptTextOrigin;
- CPoint m_ptHeaderOrigin;
- CPoint m_ptUpperMsgOrigin;
- CPoint m_ptLowerMsgOrigin;
- CPoint m_ptCaretPos;
-
- CRect m_rcTextBox;
- CRect m_rcTextBoxBorder;
- CRect m_rcMsgBoxBorder;
- CRect m_rcScroll;
-
- CString m_strInputText;
- CString m_strMessages[MAX_STRINGS];
-
- int GetNearestPos (CPoint);
- void PositionCaret (CDC* = NULL);
- void DrawInputText (CDC*);
- void ShowMessage (LPCTSTR, UINT, UINT, UINT);
- void DrawMessageHeader (CDC*);
- void DrawMessages (CDC*);
-
- public:
- CMainWindow ();
-
- protected:
- virtual void PostNcDestroy ();
-
- afx_msg int OnCreate (LPCREATESTRUCT);
- afx_msg void OnPaint ();
- afx_msg void OnSetFocus (CWnd*);
- afx_msg void OnKillFocus (CWnd*);
- afx_msg BOOL OnSetCursor (CWnd*, UINT, UINT);
- afx_msg void OnLButtonDown (UINT, CPoint);
- afx_msg void OnKeyDown (UINT, UINT, UINT);
- afx_msg void OnKeyUp (UINT, UINT, UINT);
- afx_msg void OnSysKeyDown (UINT, UINT, UINT);
- afx_msg void OnSysKeyUp (UINT, UINT, UINT);
- afx_msg void OnChar (UINT, UINT, UINT);
- afx_msg void OnSysChar (UINT, UINT, UINT);
-
- DECLARE_MESSAGE_MAP ()
- };
-